program nangle;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  x, y:array of integer;
  xo,yo,i,n,S2,sum:integer;

begin
  readln(n);
  setlength(x, n);
  setlength(y, n);
  S2:=0;
  sum:=0;
  readln(xo,yo);
  for i:=0 to n-1 do
    readln(x[i], y[1]);
  for i:=0 to n-3 do
  begin
    sum:=sum+xo*y[i]-x[i]*yo+x[i]*y[i+1]-x[i+1]*y[i]+x[i+1]*yo-xo*y[i+1];
    S2:=S2+x[i]*y[i+1]-x[i+1]*y[i]+x[i+1]*y[i+2]-x[i+2]*y[i+1]+x[i+2]*y[i]-x[i]*y[i+2];
  end;
  if sum=S2 then
    write('Yes')
  else
    write('No');
end.
